Skip to content

Update OkHttp to 3.3.1#7746

Closed
AndrewJack wants to merge 2 commits into
react:masterfrom
AndrewJack:okhttp_3.3
Closed

Update OkHttp to 3.3.1#7746
AndrewJack wants to merge 2 commits into
react:masterfrom
AndrewJack:okhttp_3.3

Conversation

@AndrewJack

@AndrewJack AndrewJack commented May 25, 2016

Copy link
Copy Markdown
Contributor

Motivation

Fixes: #7743

  • Android apps can recover from a REFUSED_STREAM in HTTP/2.
  • A few other fixes mentioned in the CHANGELOG.md

Test plan

  • CircleCi
  • Integrate into sample project (Project)

@ghost

ghost commented May 25, 2016

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified @mkonicek and @bestander to be potential reviewers.

@ghost ghost added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels May 25, 2016
@bestander

Copy link
Copy Markdown
Contributor

ping when it is ready

@AndrewJack

Copy link
Copy Markdown
Contributor Author

@bestander I have tested with a sample app and all seems to be fine.

The tests are failing with BUCK, but pass in the IDE and with Gradle.
I've tired changing a few BUCK config files but it doesn't seem to work. Do you have any idea?

@bestander

Copy link
Copy Markdown
Contributor

The first exception is

FAILURE com.facebook.react.modules.network.NetworkingModuleTest testGetWithoutHeaders: 
java.lang.AssertionError
    at okhttp3.internal.AndroidPlatform.isCleartextTrafficPermitted(AndroidPlatform.java:143)
    at okhttp3.OkHttpClient.<clinit>(OkHttpClient.java:73)

I wonder if it is something system specific

@ghost

ghost commented Jun 6, 2016

Copy link
Copy Markdown

@AndrewJack updated the pull request.

@AndrewJack

AndrewJack commented Jun 6, 2016

Copy link
Copy Markdown
Contributor Author

I've updated this PR to upgrade to OkHttp 3.3.1.

Still stumped on the BUCK unit test errors

Most of the failures have this error:

java.lang.NoClassDefFoundError: okhttp3.OkHttpClient

@AndrewJack AndrewJack changed the title Update OkHttp to 3.3 Update OkHttp to 3.3.1 Jun 6, 2016
@bestander

Copy link
Copy Markdown
Contributor

This is the error:
okhttp3.internal.AndroidPlatform.isCleartextTrafficPermitted(AndroidPlatform.java:143)
Could it be emulator based?
We could bump to another version other than 19.

@AndrewJack

AndrewJack commented Jun 7, 2016

Copy link
Copy Markdown
Contributor Author

Relates to this issue: square/okhttp#2533

and: robolectric/robolectric#2478

@mkonicek

Copy link
Copy Markdown
Contributor

Good find @AndrewJack. Should we wait for a fix in OkHttp?

@AndrewJack

Copy link
Copy Markdown
Contributor Author

Upgraded Robolectric to fix the issue, but 3.1 doesn't currently work with power mock.

Waiting for 3.1.1...
robolectric/robolectric#2429

@AndrewJack

AndrewJack commented Jul 9, 2016

Copy link
Copy Markdown
Contributor Author

Closing this issue. #8672 fixes the issues we experienced when upgrading OkHttp to 3.3.1.

Also leaving Robolectric at 3.0

@AndrewJack AndrewJack closed this Jul 9, 2016
react-one pushed a commit to react-one/react-native that referenced this pull request Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android] Fix OkHttp REFUSED_STREAM by upgrading to OkHttp 3.3

3 participants